<template>
	<view>
		<image v-if="detail.scenery_list && detail.scenery_list.length > 0" :src="detail.scenery_list[bgIndex].simgurl" class="bgImg"></image>
		<view :class="[detail.scenery_list && detail.scenery_list.length > 0 ? 'ImgTop':'bgTop']">
			<!-- 搜索 -->
			<!-- :class="tabIndex == 5 ? 'showBar':''" -->
			<uni-search-bar :placeholder="placeholder" cancelButton="none" radius="30" bgColor="#FAFAFA" borderColor="#FAFAFA"
			 @cancel="cancel" @confirm="confirm" />
			<!-- 机构信息 -->
			<view class="school-top">
				<image :src="detail.avatar ? detail.avatar : defImg"></image>
				<view class="detailInfo">
					<view class="name">{{ detail.nickname }}</view>
					<view class="head_follow" @tap="follow">{{is_follow == 2 ? '关注':'取消关注'}}</view>
				</view>
			</view>
			<!-- 选项卡 -->
			<view :class='["tabs", isTop ? "tabs-top" : ""]'>
				<view class="tabs-item" v-for="(item,index) in tabList" :key='index' @click="changeTabs(index)">{{item}}
					<text class="hr" v-show="index === tabIndex"></text>
				</view>
			</view>
		</view>
		<!-- 机构信息-->
		<view class="schoolCont">
			<view v-if="tabIndex == 0">
				<view class="info">
					<view class="infos">
						<view class="infos-left">校区地址：{{ detail.address }}<text v-if="detail.longitude && detail.latitude && detail.distance!=null">（距您{{ detail.distance }}km）</text></view>
						<view class="infos-right">
							<uni-icons type="phone-filled" color="#00ACFE" size="26" @click="playphone"></uni-icons>
							<uni-icons type="paperplane-filled" color="#00ACFE" size="26" v-if="detail.longitude && detail.latitude" @click="gotoArea"></uni-icons>
						</view>
					</view>
					<view class="infos infos-wechat">客服微信：{{detail.wechat}}</view>
				</view>
				<view class="brief" v-if="detail.brieftext">
					<view class="school-title">学校简介</view>
					<view class="school-brief">{{detail.brieftext}}</view>
				</view>
				<view class="brief" v-if="detail.scenery_list">
					<view class="school-title">学校展示</view>
					<view class="school-imgs">
						<image :src="img.simgurl" v-for="(img,imgIndex) in detail.scenery_list" :key="imgIndex" :data-index="imgIndex"
						 @tap="previewImage"></image>
					</view>
				</view>
				<view class="brief" v-if="schoolList.length > 0">
					<view class="school-title">分校展示</view>
					<view class="school-lists">
						<scroll-view class="scroll-wrap" scroll-x="true">
							<view class="school-lists-item" v-for="(item,index) in schoolList" :key="index">
								<view class="school-lists-name">{{item.branch_name}}</view>
								<view class="school-lists-info"><text>联系电话：</text>{{item.phone}}</view>
								<view class="school-lists-info"><text>邮箱：</text>{{item.email}}</view>
								<view class="school-lists-info"><text>微信：</text>{{item.wechat}}</view>
								<view class="school-lists-info"><text>校区地址：</text>{{item.location}}{{item.address}}</view>
							</view>
						</scroll-view>
					</view>
				</view>
			</view>
			<my-article v-if="tabIndex == 1" :list="information" :status="status" :contentText="contentText" stateType="0"
			 addType="999"></my-article>
			<view v-if="tabIndex == 2">
				<!-- 选项卡 -->
				<view class="tab">
					<view class="tabItem" :class="subtabIndex == index ? 'tabItem_active':''" v-for="(item,index) in subtabList" :key="index"
					 @tap="switchTap(index)">{{item}}</view>
				</view>
				<view class="msgBox">
					<!-- 视频 -->
					<my-video v-show="subtabIndex == 0" :users_type="users_type" :list="videoList" :school_id="detail.id" :status="status"
					 :contentText="contentText" type="0"></my-video>
					<!-- 文章 -->
					<my-article v-show="subtabIndex == 1" :users_type="users_type" :list="artList" :status="status" :contentText="contentText"
					 stateType="0"></my-article>
				</view>
			</view>
			<view v-if="tabIndex == 3" class="lesson-warp" v-for="(card, idx) in courseList" :key="idx">
				<view class="item">
					<v-competitive-summary mclass="lesson-card" :item="card" :status="status" :contentText="contentText"></v-competitive-summary>
				</view>
			</view>
			<view v-if="tabIndex == 4">
				<view class="teachItem" v-for="(item,index) in teacherList" :key="index">
					<v-lesson-teacher :item="item"></v-lesson-teacher>
				</view>
			</view>
			<view v-if="tabIndex == 5">
				<view class="box" v-for="(item, index) in classList" :key="index">
					<view class="box-cont">
						<view class="class_item_left"><i class="iconfont iconbanji11"></i></view>
						<view class="center-cont">
							<view class="center-cont-item1">{{item.group_name}}</view>
							<view class="center-cont-item2">
								<text>{{item.nicheng}}</text>
								<text style="margin-left: 30upx;">{{item.nums}}人</text>
							</view>
						</view>
						<!-- <i class="iconfont iconjiantou font-styll"></i> -->
					</view>
				</view>
			</view>
			<view v-if="(tabIndex == 3 && courseList.length==0)||(tabIndex == 4 && teacherList.length==0)||(tabIndex == 5 && classList.length==0)"
			 class="none">
				<i class="iconfont iconwujilu"></i>
				<text>暂无数据</text>
			</view>
			<uni-load-more v-if="(tabIndex == 3 && courseList.length >= 6) || (tabIndex == 4 && teacherList.length >= 6) || (tabIndex == 5 && classList.length >= 6)"
			 :status="status" :content-text="contentText" />
		</view>
	</view>
</template>

<script>
	import util from '@/common/util.js'
	import myArticle from '@/components/school/artlist';
	import competitiveSummary from '@/pages/free-lesson/components/competitive-summary';
	import lessonTeacher from '@/pages/free-lesson/components/lesson-teacher';
	import myVideo from '@/components/school/video';
	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
	import provinceData from '@/components/mpvue-citypicker/city-data/province.js';
	import cityData from '@/components/mpvue-citypicker/city-data/city.js';
	import areaData from '@/components/mpvue-citypicker/city-data/area.js';
	export default {
		components: {
			myArticle,
			vCompetitiveSummary: competitiveSummary,
			vLessonTeacher: lessonTeacher,
			uniLoadMore,
			myVideo
		},
		data() {
			return {
				defImg: this.defimg,
				detail: {},
				tabList: ['首页', '资讯', '抖校', '名课', '名师', '班级'], //选项卡列表
				subtabList: ['视频', '文章'],
				tabIndex: 0, //选项卡索引
				subtabIndex: 0,
				isTop: false, //是否触顶
				height: 0, //屏幕高度
				page: 1,
				reload: true,
				status: 'more',
				contentText: {
					contentdown: '上拉加载更多',
					contentrefresh: '加载中',
					contentnomore: '没有更多',
					contentnot: "没数据"
				},
				courseList: [], //名课列表
				zbSubject: uni.getStorageSync('zbSubject'), //科目列表
				teacherList: [], //教师列表
				classList: [], //班级列表
				artList: [], //文章列表
				videoList: [], //视频列表
				userBlackList: [], // 黑名单列表
				information: [],
				placeholder: '请输入您要查找的课程名称',
				users_type: '',
				bgIndex: 0, //背景图索引
				schoolList: [], //分校列表
				is_follow: 2, //是否关注该机构（1关注，2没关注）
			}
		},
		onPageScroll: function(e) {
			if (e.scrollTop >= 164) {
				this.isTop = true;
			} else {
				this.isTop = false;
			}
		},
		onReachBottom() {
			this.status = 'loading';
			this.page = this.page + 1;
			var _this = this;
			setTimeout(function() {
				switch (_this.tabIndex) {
					case 1:
						_this.getinformation();
						break
					case 2:
						if (_this.subtabIndex == 0) {
							_this.getVideoList();
						} else {
							_this.getArtList();
						}
						break
					case 3:
						_this.getCourse();
						break
					case 4:
						_this.getTeacher();
						break
					case 5:
						_this.getClass();
						break
				}
			}, 500);
		},
		onLoad(e) {
			this.users_type = Number(e.users_type);
			this.height = uni.getSystemInfoSync().screenHeight;
			this.detail = JSON.parse(decodeURIComponent(e.detail));
			if (this.detail) {
				uni.setNavigationBarTitle({
					title: this.detail.nickname ? this.detail.nickname : '机构名称'
				})
				if (this.detail.scenery_list && this.detail.scenery_list.length > 0) {
					this.detail.scenery_list.forEach((item, index) => {
						if (item.is_bg == 1) {
							this.bgIndex = index;
						}
					})
				}
			}
			if (!this.zbSubject) {
				this.getSubject();
			}
			this.getSchool();
			this.getSchoolInfo();
		},
		methods: {
			// 获取分校列表
			getSchool() {
				this.$japi.apiPost('api/v1/mobile/branch/school/infos', {
					institution_id: this.detail.id
				}).then(res => {
					if (res.data.code == 200 && res.data.data.length > 0) {
						var list = res.data.data;
						list.forEach((item, index) => {
							item.location = this.request(item.provinec_id, item.city_id, item.area_id);
						})
						this.schoolList = list;
					}
				})
			},
			// 地区查询
			request(provinec_id, city_id, area_id) {
				//查询省份
				var label = ''
				for (var _code in provinceData) {
					if (Number(provinceData[_code].value) === Number(provinec_id)) {
						label = provinceData[_code].label;
					}
				}
				//查询 城市
				var city_label = ''
				for (var i in cityData) {
					for (var k in cityData[i]) {
						if (Number(cityData[i][k].value) === Number(city_id)) {
							city_label = cityData[i][k].label;
						}
					}
				}
				//查询 区域/县
				var area_label = ''
				for (var i in areaData) {
					for (var k in areaData[i]) {
						for (var j in areaData[i][k]) {
							if (Number(areaData[i][k][j].value) === Number(area_id)) {
								area_label = areaData[i][k][j].label;
							}
						}
					}
				}
				return label + city_label + area_label;
			},
			// 获取机构信息判断是否关注
			getSchoolInfo(school_id) {
				this.$zapi.apiPost('user/shakeschool.Users/homeDetails', {
					school_id: this.detail.id
				}).then(res => {
					if (res.data.code == 200) {
						this.is_follow = res.data.data.is_follow;
					}
				})
			},
			/* 关注 & 取消关注 */
			follow() {
				let url = ''
				if (this.is_follow == 2) {
					url = 'user/shakeschool.Users/schoolFollowAdd'
				} else {
					url = 'user/shakeschool.Users/schoolFollowDel'
				}
				this.$zapi.apiPost(url, {
					school_id: this.detail.id
				}).then(res => {
					if (res.data.code == 200) {
						if (this.is_follow == 2) {
							this.is_follow = 1
						} else {
							this.is_follow = 2
						}
						this.$forceUpdate()
					}
					uni.showToast({
						title: res.data.msg,
						icon: 'none'
					})
				})
			},
			// 获取科目列表
			getSubject() {
				this.$zbapi.apiPost('common/subject').then(res => {
					if (res.data.code == 0) {
						let sub_obj = {};
						res.data.data.forEach((item, index) => {
							sub_obj[item.subject_id] = item.subject_name
						})
						uni.setStorageSync('zbSubjectArr', res.data.data) // 缓存一份科目数组，以便后续使用
						uni.setStorageSync('zbSubject', sub_obj)
						this.zbSubject = sub_obj;
					}
				})
			},
			// 拨打电话
			playphone: function(phone) {
				var _this = this;
				uni.makePhoneCall({
					// 手机号
					phoneNumber: phone ? phone : this.detail.online_phone,
					// 成功回调
					success: res => {
						console.log('调用成功!');
						//添加咨询记录
						_this.$zapi.apiPost('user/shakeschool.Lists/advisoryLog', {
							admin_user_id: this.detail.id
						});
					},
					// 失败回调
					fail: res => {
						console.log('调用失败!');
					}
				});
			},
			// 选项卡切换
			changeTabs(index) {
				this.tabIndex = index;
				this.recover();
				if (this.tabIndex == 1) {
					this.getinformation();
				} else if (this.tabIndex == 2) {
					this.getUserBlackList();
					if (this.subtabIndex == 0) {
						this.getVideoList();
					} else {
						this.getArtList();
					}
				} else if (this.tabIndex == 3) {
					uni.showLoading({
						title: '加载中...'
					})
					this.getCourse();
				} else if (this.tabIndex == 4) {
					uni.showLoading({
						title: '加载中...'
					})
					this.getTeacher();
				} else if (this.tabIndex == 5) {
					this.placeholder = '请输入您要查找的班级名称';
					uni.showLoading({
						title: '加载中...'
					})
					this.getClass();
				}
			},
			/* 抖校选项卡切换 */
			switchTap(index) {
				this.subtabIndex = index;
				this.recover();
				if (this.subtabIndex == 0) {
					this.getVideoList();
				} else {
					this.getArtList();
				}
			},
			// 恢复默认
			recover() {
				this.page = 1;
				this.reload = true;
				this.status = 'more';
				this.artList = [];
				this.videoList = [];
				this.information = [];
				this.courseList = [];
				this.teacherList = [];
				this.classList = [];
			},
			// 获取黑名单列表
			getUserBlackList() {
				this.userBlackList = []
				this.$zapi.apiPost('user/video.User/UserBlackList').then(res => {
					if (res.data.code == 200) {
						this.userBlackList = res.data.data.data
					}
				})
			},
			// 获取该学校的视频
			getVideoList() {
				let data = {
					page: this.page,
					pagesize: 8,
					users_type: this.users_type,
					school_id: this.detail.id
				}
				this.$zapi.apiPost('user/video.Lists/VideoList', data).then(res => {
					if (res.data.code == 200 && res.data.data.data.length > 0) {
						let list = res.data.data.data;
						list.forEach((v, i) => {
							v.black_state = false
							if (this.userBlackList.length > 0) {
								this.userBlackList.forEach(v1 => {
									if (v.user_id == v1.user_id) {
										v.black_state = true
									}
								})
							}
							if (v.avatar && v.avatar.substring(0, 4) != 'http') {
								// 给用户赋予默认头像
								v.avatar = this.defimg
							}
						})
						this.videoList = this.reload ? list : this.videoList.concat(list);
						this.reload = false;
						this.status = 'more';
					} else {
						if (this.reload) {
							this.videoList = [];
						} else {
							this.status = 'noMore';
						}
					}
				})
			},
			// 获取该学校的文章
			getArtList() {
				let data = {
					is_check: 2,
					users_type: this.users_type,
					school_id: this.detail.id,
					page: this.page,
					pagesize: 8
				}
				this.$zapi.apiPost('user/article.Lists/articleList', data).then(res => {
					if (res.data.code == 200 && res.data.data.data.length > 0) {
						let list = res.data.data.data;
						list.forEach((v, i) => {
							v.black_state = false
							if (this.userBlackList.length > 0) {
								this.userBlackList.forEach(v1 => {
									if (v.user_id == v1.user_id) {
										v.black_state = true
									}
								})
							}
						})
						this.artList = this.reload ? list : this.artList.concat(list);
						this.reload = false;
						this.status = 'more';
					} else {
						if (this.reload) {
							this.artList = [];
						} else {
							this.status = 'noMore';
						}
					}
				})
			},
			// 获取资讯列表
			getinformation() {
				let data = {
					admin_user_id: this.detail.id,
					page: this.page,
					pagesize: 8
				}
				this.$zapi.apiPost('user/shakeschool.Lists/informationList', data).then(res => {
					if (res.data.code == 200 && res.data.data.data.length > 0) {
						let list = res.data.data.data;
						list.forEach((item, index) => {
							item['type'] = 1;
							item['article_video'] = 1;
						})
						this.information = this.reload ? list : this.information.concat(list);
						this.reload = false;
						this.status = 'more';
					} else {
						if (this.reload) {
							this.information = [];
						} else {
							this.status = 'noMore';
						}
					}
				})
			},
			// 获取名课列表
			getCourse() {
				this.$zbapi.apiPost('stu/school/course/infos', {
					institute_id: this.detail.id,
					page: this.page,
					limit: 8
				}).then(res => {
					if (res.data.code == 0 && res.data.data.list && res.data.data.list.length > 0) {
						var list = res.data.data.list;
						list.forEach((item, index) => {
							item.start_month = util.getTodayTime(item.teach_start_day);
							item.end_month = util.getTodayTime(item.teach_end_day);
							item.subject_name = this.zbSubject[item.subject_id];
							// 头像，最多取 4 个
							item.figureimgsList = !item.figureimgs ? [] : item.figureimgs.split(',').slice(0, 4)
							let now = parseInt(Date.now() / 1000)
							let enrol = parseInt((item.enrol_end_time - now) / 86400) // 获取截止日期
							if (enrol == 0 && (item.enrol_end_time - now) > 0) {
								item.enrol_end_time = 1
							} else {
								item.enrol_end_time = enrol
							}
						})
						this.courseList = this.reload ? list : this.courseList.concat(list);
						this.reload = false;
						this.status = 'more';
					} else {
						if (this.reload) {
							this.courseList = [];
						} else {
							this.status = 'noMore';
						}
					}
					uni.hideLoading();
				})
			},
			// 获取名师列表
			getTeacher() {
				this.$zbapi.apiPost('stu/school/teacher/infos', {
					institute_id: this.detail.id,
					page: this.page,
					limit: 8
				}).then(res => {
					if (res.data.code == 0 && res.data.data.list && res.data.data.list.length > 0) {
						var list = res.data.data.list;
						list.forEach((item, index) => {
							item.t_avatar = item.figureimg ? item.figureimg : this.defImg;
							item.t_name = item.teacher_name ? item.teacher_name : '未设置昵称';
							item.t_tags = item.impression;
							item.t_id = item.teacher_id;
							item.t_seria = '教师资格证编号：' + (item.certificate_no && item.certificate_no != null ? item.certificate_no : '无')
						});

						this.teacherList = this.reload ? list : this.teacherList.concat(list);
						this.reload = false;
						this.status = 'more';
					} else {
						if (this.reload) {
							this.teacherList = [];
						} else {
							this.status = 'noMore';
						}
					}
					uni.hideLoading();
				})
			},
			// 获取班级列表
			getClass(group_name) {
				var data = {
					admin_user_id: this.detail.id,
					page: this.page,
					limit: 8
				}
				if (group_name) {
					data.group_name = group_name
				}
				this.$zapi.apiPost('user/shakeschool.Lists/classLists', data).then(res => {
					if (res.data.code == 200 && res.data.data.data.length > 0) {
						var list = res.data.data.data;
						this.classList = this.reload ? list : this.classList.concat(list);
						this.reload = false;
						this.status = 'more';
					} else {
						if (this.reload) {
							this.classList = [];
						} else {
							this.status = 'noMore';
						}
					}
					uni.hideLoading();
				})
			},
			// 取消搜索
			cancel() {
				this.recover();
				uni.showLoading({
					title: '加载中...'
				});
				switch (this.tabIndex) {
					// case 3:
					// 	this.getCourse();
					// 	break;
					// case 4:
					// 	this.getTeacher();
					// 	break;
					case 5:
						this.getClass();
						break;
					default:
						break;
				}
			},
			// 搜索
			confirm(e) {
				var value = e.value;
				if (value) {
					this.recover();
					uni.showLoading({
						title: '加载中...'
					});
					switch (this.tabIndex) {
						// case 3:
						// 	this.getCourse(value);
						// 	break;
						// case 4:
						// 	this.getTeacher(value);
						// 	break;
						case 5:
							this.getClass(value);
							break;
						default:
							break;
					}
				} else {

				}
			},
			// 图片预览
			previewImage: function(e) {
				var current = e.target.dataset.index;
				var imgList = this.detail.scenery_list.map((item, key) => {
					return item.simgurl;
				})
				uni.previewImage({
					current: current,
					urls: imgList
				});
			},
			// 导航
			gotoArea() {
				var url = "";
				var baiduLocation = this.bd_encrypt(this.detail.longitude, this.detail.latitude);
				if (plus.os.name == "Android") {
					var hasBaiduMap = plus.runtime.isApplicationExist({
						pname: 'com.baidu.BaiduMap',
						action: 'baidumap://'
					});
					var hasAmap = plus.runtime.isApplicationExist({
						pname: 'com.autonavi.minimap',
						action: 'androidamap://'
					});
					var urlBaiduMap = "baidumap://map/marker?location=" + baiduLocation + "&title=" + this.detail.address +
						"&src=Hello%20uni-app";
					var urlAmap =
						"androidamap://viewMap?sourceApplication=Hello%20uni-app&poiname=" + this.detail.address + "&lat=" + this.detail.latitude +
						"&lon=" + this.detail.longitude + "&dev=0"
					if (hasAmap && hasBaiduMap) {
						plus.nativeUI.actionSheet({
							title: "选择地图应用",
							cancel: "取消",
							buttons: [{
								title: "百度地图"
							}, {
								title: "高德地图"
							}]
						}, function(e) {
							switch (e.index) {
								case 1:
									plus.runtime.openURL(urlBaiduMap);
									break;
								case 2:
									plus.runtime.openURL(urlAmap);
									break;
							}
						})
					} else if (hasAmap) {
						plus.runtime.openURL(urlAmap);
					} else if (hasBaiduMap) {
						plus.runtime.openURL(urlBaiduMap);
					} else {
						url = "geo:39.96310,116.340698?q=%e6%95%b0%e5%ad%97%e5%a4%a9%e5%a0%82";
						plus.runtime.openURL(url); //如果是国外应用，应该优先使用这个，会启动google地图。这个接口不能统一坐标系，进入百度地图时会有偏差  
					}
				} else {
					// iOS上获取本机是否安装了百度高德地图，需要在manifest里配置，在manifest.json文件app-plus->distribute->apple->urlschemewhitelist节点下添加（如urlschemewhitelist:["iosamap","baidumap"]）  
					plus.nativeUI.actionSheet({
						title: "选择地图应用",
						cancel: "取消",
						buttons: [{
							title: "Apple地图"
						}, {
							title: "百度地图"
						}, {
							title: "高德地图"
						}]
					}, function(e) {
						switch (e.index) {
							case 1:
								url =
									"http://maps.apple.com/?q=%e6%95%b0%e5%ad%97%e5%a4%a9%e5%a0%82&ll=" + this.detail.latitude + "," + this.detail
									.longitude + "&spn=0.008766,0.019441";
								break;
							case 2:
								url = "baidumap://map/marker?location=" + baiduLocation + "&title=" + this.detail.address +
									"&src=Hello%20uni-app";
								break;
							case 3:
								url =
									"iosamap://viewMap?sourceApplication=Hello%20uni-app&poiname=" + this.detail.address + "&lat=" + this.detail
									.latitude +
									"&lon=" + this.detail.longitude + "&dev=0";
								break;
							default:
								break;
						}
						if (url != "") {
							plus.runtime.openURL(url, function(e) {
								plus.nativeUI.alert("本机未安装指定的地图应用");
							});
						}
					})
				}
			},
			//高德坐标转百度（传入经度、纬度）
			bd_encrypt(gg_lng, gg_lat) {
				var X_PI = Math.PI * 3000.0 / 180.0;
				var x = gg_lng,
					y = gg_lat;
				var z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * X_PI);
				var theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * X_PI);
				var bd_lng = z * Math.cos(theta) + 0.0065;
				var bd_lat = z * Math.sin(theta) + 0.006;
				return bd_lat + ',' + bd_lng;
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #FAFAFA;
	}

	.bgImg {
		position: absolute;
		width: 100%;
		height: 386upx;
		top: 0;
		left: 0;
	}

	.ImgTop {
		background: linear-gradient(180deg, rgba(153, 153, 153, 0.49) 0%, rgba(77, 77, 77, 0.49) 100%);
		position: relative;
		width: 100%;
		height: 386upx;
	}

	.bgTop {
		background: #ACACAC;
	}

	.uni-searchbar {
		background: transparent !important;
		opacity: 0;
	}

	.showBar {
		opacity: 1;
	}

	.school-top {
		padding: 100upx 30upx 20upx;
		display: flex;
		justify-content: flex-start;
		align-items: flex-start;

		& image {
			width: 176upx;
			height: 176upx;
			border-radius: 8upx;
			margin-right: 20upx;
		}

		.detailInfo {
			width: calc(100% - 100px);

			.name {
				color: #FFFFFF;
				font-size: 36upx;
				margin-top: 10upx;
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
			}

			.head_follow {
				width: 78%;
				color: #FFFFFF;
				font-size: 30upx;
				height: 60upx;
				line-height: 60upx;
				text-align: center;
				border-radius: 30upx;
				margin-top: 20upx;
				background:linear-gradient(360deg,rgba(254,118,91,1) 0%,rgba(254,185,104,1) 100%);
				box-shadow:0px 3px 6px rgba(127,234,208,0.1);
			}
		}
	}

	.tabs {
		display: flex;
		white-space: nowrap;
		overflow: auto;

		.tabs-item {
			position: relative;
			padding: 18upx 44upx;
			font-size: 30upx;
			color: #FFFFFF;

			.hr {
				position: absolute;
				width: 80upx;
				height: 8upx;
				right: 0;
				left: 0;
				bottom: 0;
				margin: auto;
				background: #FFFFFF;
			}
		}
	}

	.tabs-top {
		position: fixed;
		z-index: 999;
		width: 100%;
		background-color: #ACACAC;
		/* #ifdef APP-PLUS */
		top: 0upx;
		/* #endif */
		/* #ifdef H5 */
		top: 88upx;
		/* #endif */
	}

	.schoolCont {
		margin-bottom: 100upx;
		margin-top: 20upx;

		.info {
			padding: 20upx 30upx;
			background-color: #FFFFFF;

			.infos {
				display: flex;
				justify-content: space-between;
				align-items: center;
				color: #333333;
				margin: 20upx 0;

				.infos-left {
					width: 75%;
					padding-right: 5%;
					word-break: break-word;
					border-right: 2upx solid #CCCCCC;
				}

				.infos-right {
					display: flex;
					margin: auto;

					.uni-icons {
						line-height: 1.5;
					}
				}
			}

			.infos-wechat {
				padding: 20upx 0;
				border-top: 2upx solid #E5E5E5;
			}

		}

		.brief {
			margin: 30upx;
			border-radius: 20upx;
			background-color: #FFFFFF;
			padding: 30upx 20upx 40upx;

			.school-title {
				color: #333333;
				font-size: 32upx;
				margin-bottom: 20upx;
			}

			.school-brief {
				color: #666666;
				font-size: 30upx;
				line-height: 1.5;
			}

			.school-imgs {
				display: flex;
				justify-content: flex-start;
				align-items: center;
				flex-wrap: wrap;
				margin-top: 20upx;
			
				& image {
					width: 32%;
					margin: 0 0 20upx 1%;
					height: 120upx;
					border-radius: 20upx;
					margin-bottom: 20upx;
				}
			}

			.school-lists {
				margin: 0 auto;
				width: 100%;

				.scroll-wrap {
					width: 100%;
					height: 320upx;
					white-space: nowrap;

					.school-lists-item {
						display: inline-block;
						padding: 20upx 30upx;
						width: calc(100% - 90upx);
						border-radius: 20upx;
						box-shadow: 0 2upx 10upx #CCCCCC;
						margin: 10upx;

						& view {
							color: #333333;
							overflow: hidden;
							white-space: nowrap;
							text-overflow: ellipsis;
						}

						.school-lists-name {
							font-size: 34upx;
							font-weight: bold;
						}
					}
				}
			}
		}
	}

	.lesson-warp {
		padding: 0 40upx;

		.item {
			margin-bottom: 20upx;
			width: 100%;

			.lesson-card {
				background: #FFF !important;
				border-radius: 20upx;
			}
		}
	}

	.teachItem {
		margin: 10upx 30upx 0;
	}

	.box {
		display: flex;
		align-items: center;
		margin-left: auto;
		margin-right: auto;
		width: 690upx;
		height: 160upx;
		margin-top: 20upx;
		background-color: #ffffff;
		border-radius: 30upx;

		.box-cont {
			display: flex;
			justify-content: flex-start;
			align-items: center;
			margin-left: auto;
			margin-right: auto;
			width: 606upx;

			.iconbanji11 {
				color: #FF9900;
				font-size: 110upx;
				line-height: 1;
				margin-top: -10upx;
			}

			.center-cont {
				display: flex;
				flex-direction: column;
				justify-content: center;
				position: relative;
				width: 418upx;
				left: 1upx;
				height: 80upx;
				margin-left: 20upx;

				.center-cont-item1 {
					color: #333333;
					font-size: 36upx;
				}

				.center-cont-item2 {
					color: #666666;
					font-size: 32upx;
				}
			}

			.font-styll {
				font-size: 48upx;
				color: #999999;
			}
		}
	}

	/* 选项卡 */
	.tab {
		display: flex;
		justify-content: space-around;
		align-items: center;
		width: 100%;
		background-color: #FFFFFF;
		margin-top: 20upx;
		border-bottom: 2upx solid #F7F7F7;
		flex-shrink: 0;

		.tabItem {
			color: #999999;
			font-size: 32upx;
			text-align: center;
			position: relative;
			padding: 12upx 0;
		}

		.tabItem_active {
			color: #FF9900;
		}

		.tabItem_active:before {
			position: absolute;
			content: '';
			width: 36upx;
			height: 4upx;
			bottom: 0;
			left: 0;
			right: 0;
			margin: auto;
			background: #FF9900;
		}
	}

	.msgBox {
		background-color: #FFFFFF;
		flex: 1;
	}

	.news_other {
		padding-top: 0;
	}

	.videoAll {
		padding: 40upx 32upx !important;
	}

	.news {
		padding-top: 0upx !important;
	}

	.none {
		color: #999999;
		text-align: center;
	}

	.none .iconwujilu {
		color: #E5E5E5;
		font-size: 306upx;
		line-height: 1;
		display: block;
	}

	.none text {
		color: #E5E5E5;
		font-size: 46upx;
		display: block;
	}
</style>
